 /* 
 * File:   StateMachine.h
 * Author: josep
 *
 * Created on 5 / desembre / 2010, 05:42
 */
#include "State.h"
#include <vector>

using namespace std;

#ifndef STATEMACHINE_H
#define	STATEMACHINE_H

template <typename T>
class StateMachine {
public:
    //vector<State> states;
    StateMachine();
    StateMachine(State<T> *state);
    StateMachine(int nStates);
    StateMachine(const StateMachine& orig);
    virtual ~StateMachine();
    void setInitialState(State<T> * state);
    void setInitialState(int stateId);
    void processTransition(int transValue);
    State<T>* addState(T *owner);
    State<T>* getState(int ind);
    State<T>* getCurrentState();
private:
    State<T>* state;
    vector<State<T> > states;
};

#include "StateMachine.cpp"

#endif	/* STATEMACHINE_H */

